<?php
namespace Contact;

use Zend_Form;

class SearchForm extends Zend_Form
{

    public function init()
    {
        $this->addElement('text', 'q', array(
            'label'     => 'Search',
            'maxLength' => '50',
        ));
        $this->addElement('select', 'serviceId', array(
            'label'        => 'Service',
        ));
        $this->addElements(array(
            array('submit', 'submitSearchForm', array('label' => 'Search')),
            array('reset', 'resetSearchForm', array('label' => 'Reset'))
        ));
        $this->setAttrib('style', 'display: inline');
        $this->setAttrib('onSubmit', "$('#submitSearchForm').remove()");
        $this->setMethod('GET');
    }
}